import Taro, { Component } from '@tarojs/taro'
import Index from './pages/index'

import 'taro-ui/dist/style/index.scss'
import 'taro-parse/dist/style/main.scss'

class App extends Component {
    config = {
        pages: [
            'pages/index/index',
            // 'pages/test/test',
        ],
        subpackages: [
            {
                "root": "pages/type",
                "pages": ["type-list", "type-edit"],
            },
            {
                "root": "pages/note",
                "pages": ["note-edit"],
            },
            {
                "root": "pages/stats",
                "pages": ["stats"],
            },
            {
                "root": "pages/login",
                "pages": ["login", "bind"],
            },
        ],
        // tabBar: { },
        window: {
            backgroundTextStyle: 'light',
            navigationBarBackgroundColor: '#fff',
            navigationBarTitleText: 'WeChat',
            navigationBarTextStyle: 'black'
        }
    }

    componentDidMount() {
        console.info("env:", process.env.NODE_ENV)
    }

    // 在 App 类中的 render() 函数没有实际作用
    // 请勿修改此函数
    render() {
        return (
            <Index />
        )
    }
}

Taro.render(<App />, document.getElementById('app'))